# -*- coding: utf-8 -*-

# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
import logging


class JingdongPipeline(object):

    def process_item(self, item, spider):
        file_name = 'C:\\Users\\w4055\\Desktop\\um.json'
        with open(file_name, 'w') as file_obj:
            s = str(item['shop_name'][0]) + ','
            print(s)
        return item
